<template>
  <div class="error">
    <h2>error {{ error }}</h2>
    <div>
      <button @click="goHome">home</button>
    </div>
  </div>
</template>

<script setup lang="ts">
  const props = defineProps({
    error: Object,
  });

  const goHome = () => {
    clearError({ redirect: "/" }); // 清除错误
  };
</script>

<style lang="less" scoped>
  .error {
  }
</style>
